<%--
  Created by IntelliJ IDEA.
  User: MGL
  Date: 2020/10/13
  Time: 20:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>添加员工</title>
    <link rel="stylesheet" type="text/css" href="../css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../lib/My97DatePicker/4.8/skin/WdatePicker.css" />
    <script type="text/javascript" src="../lib/html5shiv.js"></script>
    <script type="text/javascript" src="../lib/respond.min.js"></script>
    <script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="../js/H-ui.min.js"></script>
    <script type="text/javascript" src="../js/H-ui.admin.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script type="text/javascript" src="../lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="../lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="../lib/jquery.validation/1.14.0/messages_zh.js"></script>
</head>
<body>
<article class="page-container">
    <form class="form form-horizontal" id="form-admin-add" action="${pageContext.request.contextPath}/getEmp/getAddEmp" method="post">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>用户名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="admin" placeholder="" id="userName" name="userName" datatype="*">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>初始密码：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="password" class="input-text" autocomplete="off" value="123" placeholder="密码" id="password" name="passWord">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>确认密码：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="password" class="input-text" autocomplete="off"  value="123" placeholder="确认新密码" id="password2" name="password2" recheck="passWord">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>性别：</label>
            <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                <div class="radio-box">
                    <input name="sex" type="radio" id="sex-1" value="1" checked>
                    <label for="sex-1">男</label>
                </div>
                <div class="radio-box">
                    <input type="radio" id="sex-2" name="sex" value="0" >
                    <label for="sex-2">女</label>
                </div>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>部门：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" value="10" class="input-text" name="departmentId" id="department_id" datatype="n">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>生日：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text Wdate" name="birthday" id="birthday" onclick="WdatePicker()">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>手机：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="13456789" id="phone" name="mobile" datatype="m">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>邮箱：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" name="email" id="email" datatype="e" value="admin@qq.com">
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>
<script type="text/javascript">

    <%--$("#form-admin-add").validate({--%>

    <%--    onkeyup:false,--%>

    <%--    submitHandler:function(form){--%>
    <%--        var dateEmp=form.serializeArray();--%>
    <%--        var obj=new Object();--%>
    <%--        for(var i=0;i<dateEmp.length;i++){--%>
    <%--            obj[dateEmp[i].name]=dateEmp[i].value;--%>
    <%--        }--%>
    <%--        $(form).ajaxSubmit({--%>
    <%--            contentType : 'application/json; charset=utf-8',--%>
    <%--            type: 'post',--%>
    <%--            url: "${pageContext.request.contextPath}/getEmp/getAddEmp",--%>
    <%--            data:JSON.stringify(obj),--%>
    <%--            dataType:'json',--%>
    <%--            success: function(data){--%>
    <%--                layer.msg('添加成功!',{icon:1,time:1000});--%>
    <%--                var index = parent.layer.getFrameIndex(window.name);--%>
    <%--                parent.$('.btn-refresh').click();--%>
    <%--                parent.layer.close(index);--%>

    <%--            },--%>
    <%--            error: function(XmlHttpRequest, textStatus, errorThrown){--%>
    <%--                layer.msg('error!',{icon:1,time:1000});--%>
    <%--            }--%>
    <%--        });--%>

    <%--        return false;--%>
    <%--    }--%>
    <%--});--%>

</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
